import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router';

@Component({
  selector: 'app-zhuce1',
  templateUrl: './zhuce1.page.html',
  styleUrls: ['./zhuce1.page.scss'],
})
export class Zhuce1Page implements OnInit {

  public password1:any;
  public userInfo:any={
    name:'',
    phoneNumber:'',
    pwd:''
  }

  constructor( public router:Router,public arouter:ActivatedRoute) { }

  ngOnInit() {

    this.arouter.params.subscribe((data)=>{
      // console.log(data);
      this.userInfo.name = data.name;
      this.userInfo.phoneNumber = data.phoneNumber;
      console.log(this.userInfo)
    })
  }

  next() {
    // if (this.password1 == "") {
    //   alert("请输入账号");
    // } else if (this.password2 == "") {
    //     alert("请输入密码");
    // } else {
        // this.userInfo['pwd']=this.password2;
        this.router.navigate(['/zhuce-pro/',this.userInfo])
    // }
  }

}
